package com.outstanding.his.patient.service.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.outstanding.his.patient.dao.IPatientDao;
import com.outstanding.his.patient.domain.Patient;
import com.outstanding.his.patient.service.IPatientService;

@Service("patientService")
public class PatientService implements IPatientService{

	@Autowired
	public IPatientDao patientDao;

	public void setPatientDao(IPatientDao patientDao) {
		this.patientDao = patientDao;
	}

	@Override
	public Collection<Patient> getPatientList() {
		return this.patientDao.getPatientList();
	}

	@Override
	public Patient submitPatient(Patient patient) {
		patient = this.patientDao.submitPatient(patient);
		return patient;
	}

	@Override
	public Patient getPatient(final Integer patientId) {
		return this.patientDao.getPatient(patientId);
	}

	@Override
	public Patient updatePatient(Patient patient) {
		patient = this.patientDao.updatePatient(patient);
		return patient;
	}

}
